package com.ns.util;

import java.io.InputStream;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClients;

public class HttpStream {
	public static InputStream readRemoteImg(String url){
		try {
			HttpClient client = HttpClients.createDefault();
			HttpGet get = new HttpGet(url);
			HttpResponse resp = client.execute(get);
			return resp.getEntity().getContent();
		} catch (Exception e) {
			return null;
		}
	}
}
